#ifndef __TRIE_H__
#define __TRIE_H__

#include <iostream>
#include <queue>
#include <utility>
#include <vector>
#include "trie_node.h"

class Trie
{
public:
    Trie();
    ~Trie();

    void insert(const std::string & key);
    bool prefix(const std::string & key);
    bool search(const std::string & key);
    void remove(const std::string & key);
    std::vector<std::string> getAllStr();

// protected:
    void insert(const char * data, int size);
    TrieNode * search(const char * data, int size);
    void remove(const char * data, int size);

// private:
    TrieNode * m_root;
    int m_size;
};

#endif
